ROOT=../..

CC=gcc
CFLAGS= -g -Wall -Wextra -std=c99 -I$(ROOT)/include
LDFLAGS= -std=c99 -I$(ROOT)/include -L$(ROOT)/lib -lbcl 

OBJ= ppm_patchmatch.o pyramid.o masked_image.o inpainting_method.o

all: ppm_patchmatch  

pyramid.o:
	$(CC) -c pyramid.c $(LDFLAGS)

masked_image.o:
	$(CC) -c masked_image.c $(LDFLAGS)

inpainting_method: pyramid.o  masked_image.o inpainting_method.o
	$(CC) pyramid.o inpainting_method.o masked_image.o $(LDFLAGS) -o inpainting_method

ppm_patchmatch: ppm_patchmatch.o
	$(CC) ppm_patchmatch.o $(LDFLAGS) -o ppm_patchmatch

install : all
	cp patchmatch $(ROOT)/bin/

clean :
	rm -f $(OBJ)

